import service from "@/utils/request";
const DEPT_BASE_URL = "/api/";

/**
 * 种母断奶
 */
class sheepAblactations{
  //种母断奶添加
  static async AddEweWeaning(data: any) {
    return service({
      url: '/api/SheepAblactation/AddSheepAblactation',
      method: 'post',
      data
    })
  }

  //获取栋舍列表下拉框
  static async getRidgepoleAsync() {
    return service({
      url: '/api/Ridgepoles/GetShow',
      method: 'get',
      params: {
        RidgepoleTypeId: 0,
        PageIndex: 1,
        PageSize: 100
      }
    });
  }
  //根据栋舍获取栏位
  static async getColumnByRidId(id: number) {
    return service({
      url: '/api/ColumnManages/GetColumn',
      method: 'get',
      params: {
        ridgepoleId:id
      }
    });
  }

  //种母断奶列表获取负责人
  static async getSheepfileManagers() {
    return service({
      url: '/api/User/GetUsers',
      method: 'get'
    });
  }

  //种母断奶列表
  static async getSheepAblactationList(data: any) {
    return service({
      url: '/api/SheepAblactation/GetSheepAblactation',
      method: 'post',
      data
    });
  }
  //获取档案表母羊在哺乳的耳号列表
  static async getSheepAblactationEarList() {
    return service({
      url: '/api/SheepAblactation/GetEweEarTagsFromSheepFile',
      method: 'get',
    })
  }
  //根据耳号反填栋舍栏位
  static async getBuildByEar(eartag: string) {
    return service({
      url: '/api/SheepFileModels/DteilSheepfilemodel',
      method: 'get',
      params: {
        eartag: eartag
      }
    })
  }
}
export default sheepAblactations;